package com.ruoyi.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.data.annotation.Transient;

/**
 * 座位对象 seat
 *
 * @author ...
 * @date 2022-03-17
 */
public class Seat extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Integer id;

    /**
     * 自习室id
     */
    @Excel(name = "自习室id")
    private String roomId;

    /**
     * 自习室
     */
    @Excel(name = "自习室")
    private String roomName;

    /**
     * 座位
     */
    @Excel(name = "座位")
    private String name;

    /**
     * 类型id
     */
    @Excel(name = "类型id")
    private String typeId;

    /**
     * 类型
     */
    @Excel(name = "类型")
    private String type;

    /**
     * 编号
     */
    @Excel(name = "编号")
    private Integer num;

    /**
     * 状态
     */
    @Excel(name = "状态")
    private String status;

    /**
     * 状态码
     */
    @Transient
    private Integer sta;

    /**
     * 状态码
     */
    @Transient
    private String price;

    public Integer getSta() {
        if ("空闲".equals(status)) {
            sta = 0;
        } else {
            sta = 1;
        }
        return sta;
    }

    /**
     * 创建人
     */
    @Excel(name = "创建人")
    private Integer createUser;

    /**
     * 修改人
     */
    @Excel(name = "修改人")
    private Integer updateUser;

    /**
     * 是否已删除
     */
    @Excel(name = "是否已删除")
    private Integer isDeleted;

    /**
     * 行
     */
    private Integer row;

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    /**
     * 列
     */
    private Integer column;

    public Integer getRow() {
        return row;
    }

    public void setRow(Integer row) {
        this.row = row;
    }

    public Integer getColumn() {
        return column;
    }

    public void setColumn(Integer column) {
        this.column = column;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setRoomId(String roomId) {
        this.roomId = roomId;
    }

    public String getRoomId() {
        return roomId;
    }

    public void setRoomName(String roomName) {
        this.roomName = roomName;
    }

    public String getRoomName() {
        return roomName;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public String getTypeId() {
        return typeId;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getNum() {
        return num;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public void setCreateUser(Integer createUser) {
        this.createUser = createUser;
    }

    public Integer getCreateUser() {
        return createUser;
    }

    public void setUpdateUser(Integer updateUser) {
        this.updateUser = updateUser;
    }

    public Integer getUpdateUser() {
        return updateUser;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("roomId", getRoomId())
                .append("roomName", getRoomName())
                .append("name", getName())
                .append("typeId", getTypeId())
                .append("type", getType())
                .append("num", getNum())
                .append("status", getStatus())
                .append("createTime", getCreateTime())
                .append("createUser", getCreateUser())
                .append("updateTime", getUpdateTime())
                .append("updateUser", getUpdateUser())
                .append("isDeleted", getIsDeleted())
                .append("row", getRow())
                .append("column", getColumn())
                .toString();
    }
}
